package yu.code.provider;

import yu.code.provider.service.UserServiceImpl;
import yu.code.service.UserService;
import yu.code.yurpc.bootstrap.ProviderBootStrap;
import yu.code.yurpc.model.ServiceRegisterInfo;

import java.util.ArrayList;
import java.util.List;

public class ProviderExample {

    public static void main(String[] args) {
        // 要注册的服务
        List<ServiceRegisterInfo<?>> serviceRegisterInfoList = new ArrayList<>();
        ServiceRegisterInfo<UserServiceImpl> serviceRegisterInfo = new ServiceRegisterInfo<>(UserService.class.getName(), UserServiceImpl.class);
        serviceRegisterInfoList.add(serviceRegisterInfo);

        // 服务提供者初始化
        ProviderBootStrap.init(serviceRegisterInfoList);
    }
}